package com.example.TestCode.JavaBasics;

/**
 * @auther hewenhui
 * @see <a href="hetp://www.codingmaster.com> java </a>
 */
public class CompetitionEligibility {
    public String divide(String sex, int weight){
        String result = null;
        if("male".equals(sex)){
            if(weight >= 54){
                result = "Can participate in men's group competitions";
            }else{
                result = "Not eligible to participate";
            }
        }else if("female".equals(sex)){
            if(weight >= 46){
                result = "Can participate in women's group competitions";
            }else{
                result = "Not eligible to participate";
            }
        }else{
            result = "gender is not normal";
        }
        return result;
    }
}
